(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

rev(nil) → nil
rev(.(x, y)) → ++(rev(y), .(x, nil))
car(.(x, y)) → x
cdr(.(x, y)) → y
null(nil) → true
null(.(x, y)) → false
++(nil, y) → y
++(.(x, y), z) → .(x, ++(y, z))

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

rev(nil) → nil [1]
rev(.(x, y)) → ++(rev(y), .(x, nil)) [1]
car(.(x, y)) → x [1]
cdr(.(x, y)) → y [1]
null(nil) → true [1]
null(.(x, y)) → false [1]
++(nil, y) → y [1]
++(.(x, y), z) → .(x, ++(y, z)) [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

rev(nil) → nil [1]
rev(.(x, y)) → ++(rev(y), .(x, nil)) [1]
car(.(x, y)) → x [1]
cdr(.(x, y)) → y [1]
null(nil) → true [1]
null(.(x, y)) → false [1]
++(nil, y) → y [1]
++(.(x, y), z) → .(x, ++(y, z)) [1]

The TRS has the following type information:
rev :: nil:. → nil:.
nil :: nil:.
. :: car → nil:. → nil:.
++ :: nil:. → nil:. → nil:.
car :: nil:. → car
cdr :: nil:. → nil:.
null :: nil:. → true:false
true :: true:false
false :: true:false

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


car
cdr
null

(c) The following functions are completely defined:

rev
++

Due to the following rules being added:
none

And the following fresh constants:

const

(6) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

rev(nil) → nil [1]
rev(.(x, y)) → ++(rev(y), .(x, nil)) [1]
car(.(x, y)) → x [1]
cdr(.(x, y)) → y [1]
null(nil) → true [1]
null(.(x, y)) → false [1]
++(nil, y) → y [1]
++(.(x, y), z) → .(x, ++(y, z)) [1]

The TRS has the following type information:
rev :: nil:. → nil:.
nil :: nil:.
. :: car → nil:. → nil:.
++ :: nil:. → nil:. → nil:.
car :: nil:. → car
cdr :: nil:. → nil:.
null :: nil:. → true:false
true :: true:false
false :: true:false
const :: car

Rewrite Strategy: INNERMOST

(7) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

rev(nil) → nil [1]
rev(.(x, nil)) → ++(nil, .(x, nil)) [2]
rev(.(x, .(x', y'))) → ++(++(rev(y'), .(x', nil)), .(x, nil)) [2]
car(.(x, y)) → x [1]
cdr(.(x, y)) → y [1]
null(nil) → true [1]
null(.(x, y)) → false [1]
++(nil, y) → y [1]
++(.(x, y), z) → .(x, ++(y, z)) [1]

The TRS has the following type information:
rev :: nil:. → nil:.
nil :: nil:.
. :: car → nil:. → nil:.
++ :: nil:. → nil:. → nil:.
car :: nil:. → car
cdr :: nil:. → nil:.
null :: nil:. → true:false
true :: true:false
false :: true:false
const :: car

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

nil => 0
true => 1
false => 0
const => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ y :|: z'' = y, y >= 0, z' = 0
++(z', z'') -{ 1 }→ 1 + x + ++(y, z) :|: z'' = z, z >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(0, 1 + x + 0) :|: x >= 0, z' = 1 + x + 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

(11) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(12) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 1 }→ 1 + x + ++(y, z'') :|: z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

(13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ ++ }
{ null }
{ cdr }
{ car }
{ rev }

(14) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 1 }→ 1 + x + ++(y, z'') :|: z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {++}, {null}, {cdr}, {car}, {rev}

(15) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: ++
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z' + z''

(16) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 1 }→ 1 + x + ++(y, z'') :|: z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {++}, {null}, {cdr}, {car}, {rev}
Previous analysis results are:
++: runtime: ?, size: O(n1) [z' + z'']

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: ++
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z'

(18) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 1 }→ 1 + x + ++(y, z'') :|: z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {null}, {cdr}, {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']

(19) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(20) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {null}, {cdr}, {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']

(21) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: null
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(22) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {null}, {cdr}, {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: ?, size: O(1) [1]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: null
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(24) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {cdr}, {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]

(25) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(26) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {cdr}, {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]

(27) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: cdr
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

(28) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {cdr}, {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
cdr: runtime: ?, size: O(n1) [z']

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: cdr
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(30) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
cdr: runtime: O(1) [1], size: O(n1) [z']

(31) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(32) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
cdr: runtime: O(1) [1], size: O(n1) [z']

(33) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: car
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

(34) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {car}, {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
cdr: runtime: O(1) [1], size: O(n1) [z']
car: runtime: ?, size: O(n1) [z']

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: car
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(36) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
cdr: runtime: O(1) [1], size: O(n1) [z']
car: runtime: O(1) [1], size: O(n1) [z']

(37) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(38) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
cdr: runtime: O(1) [1], size: O(n1) [z']
car: runtime: O(1) [1], size: O(n1) [z']

(39) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: rev
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

(40) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed: {rev}
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
cdr: runtime: O(1) [1], size: O(n1) [z']
car: runtime: O(1) [1], size: O(n1) [z']
rev: runtime: ?, size: O(n1) [z']

(41) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: rev
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 4 + 3·z' + 2·z'2

(42) Obligation:

Complexity RNTS consisting of the following rules:

++(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
++(z', z'') -{ 2 + y }→ 1 + x + s' :|: s' >= 0, s' <= 1 * y + 1 * z'', z'' >= 0, z' = 1 + x + y, x >= 0, y >= 0
car(z') -{ 1 }→ x :|: z' = 1 + x + y, x >= 0, y >= 0
cdr(z') -{ 1 }→ y :|: z' = 1 + x + y, x >= 0, y >= 0
null(z') -{ 1 }→ 1 :|: z' = 0
null(z') -{ 1 }→ 0 :|: z' = 1 + x + y, x >= 0, y >= 0
rev(z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (1 + (z' - 1) + 0), z' - 1 >= 0
rev(z') -{ 1 }→ 0 :|: z' = 0
rev(z') -{ 2 }→ ++(++(rev(y'), 1 + x' + 0), 1 + x + 0) :|: z' = 1 + x + (1 + x' + y'), x >= 0, x' >= 0, y' >= 0

Function symbols to be analyzed:
Previous analysis results are:
++: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
null: runtime: O(1) [1], size: O(1) [1]
cdr: runtime: O(1) [1], size: O(n1) [z']
car: runtime: O(1) [1], size: O(n1) [z']
rev: runtime: O(n2) [4 + 3·z' + 2·z'2], size: O(n1) [z']

(43) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(44) BOUNDS(1, n^2)